package com.fxd.crm.web.controller.dataAnalysis;

import com.fxd.crm.model.monthIncome;
import com.fxd.crm.service.IDataAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @auther fuxudong
 * @date 2021/4/4 - 13:53
 */
@Controller
@RequestMapping("/dataAnalysis")
public class incomeAnalysisController {

    @Autowired
    IDataAnalysisService dataAnalysisService;


    @RequestMapping("income")
    public String income(){
        return "dataAnalysis/income";
    }

    @RequestMapping("monthIncome")
    @ResponseBody
    public List<monthIncome> monthIncome(){

        List<monthIncome> monthIncome=dataAnalysisService.getMonthIncome();
        return monthIncome;

    }
}
